//
//  ObjectPQTest.m
//  ObjectivePQ
//
//  Created by Ian Michell on 08/07/2007.
//  Copyright 2007 Ian Michell. All rights reserved.
//

#import "ObjectPQTest.h"
#import "PQConnection.h"
#import "PQStatement.h"

@implementation ObjectPQTest
- (void) testConnection
{
	//NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
	NSString* connStr = @"host='localhost' port='5432' dbname='template1' user='postgres' password=''";
	PQConnection *conn = (PQConnection*)[[PQConnection alloc] initWithConnectionString: connStr];

	[conn connect];
	STAssertTrue([conn isConnected], @"The connection is not active!");
	[conn close];
	STAssertFalse([conn isConnected], @"The connection is still alive!");

}
@end

